package com.open.capacity.notice.cron;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Service;

import com.open.capacity.notice.manager.SendMessageManager;

import lombok.RequiredArgsConstructor;

/**
 * 启动时调度所有后端定时任务 
 */
@Service
@RequiredArgsConstructor
public class CronJob implements CommandLineRunner {

	private final SendMessageManager sendMessageManager;

	@Override
	public void run(String... args) throws Exception {
		sendMessageManager.crontab();
	}

}
